<template>
	<view class="user bg-white  flex flex-direction  clearfix ">
		<cu-custom bgColor="bg-white " isBack :class="{'bg-mengceng':choicebox}">
			<block slot="content">发布需求</block>
		</cu-custom>
		<view class="bg-f7  wp100"></view>
		<view  class="bg-white mb10">
			<view class="flex align-center justify-between  py15 bb1  px15" >
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">选择分类</view>
				</view>
				<view class="flex align-center justify-end" >
					<input class="text--right f14 mr5" disabled v-model="shoptype" @click="choicebox=true;selectIndex=0;" placeholder-class="text-info" placeholder="请选择服务类型"   />
					<text class="cuIcon-right text-info"></text>
				</view>
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15" >
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">选择社区</view>
				</view>
				<view class="flex align-center justify-end" >
					<input class="text--right f14 mr5" disabled v-model="communitytype" @click="choicebox=true;selectIndex=1;" placeholder-class="text-info" placeholder="请选择社区"   />
					<text class="cuIcon-right text-info"></text>
				</view>
			</view>
			<view class="flex align-center justify-between  py5 mt10  px15">
				<view class="flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">上传图片</view>
				</view>
			</view>
			<view class="flex align-center mt15">
				<view class="flex align-center  justify-between p100 px5" style="flex-wrap: wrap;">
					<view class="flex align-center flex-direction" style="width: 33.33%" @click="uppic('0')">
						<view class="solids block140 discenter" v-if="isfrz==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrz" class="block140" mode="" v-else></image>
						<text class="mt10">第一张</text>
					</view>
					<view class="flex align-center flex-direction" style="width: 33.33%" @click="uppic('1')">
						<view class="solids block140 discenter" v-if="isfrf==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrf" class="block140" mode="" v-else></image>
						<text class="mt10">第二张</text>
					</view>
					<view class="flex align-center flex-direction" style="width: 33.33%" @click="uppic('2')">
						<view class="solids block140 discenter" v-if="isfra==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfra" class="block140" mode="" v-else></image>
						<text class="mt10">第三张</text>
					</view>
					<view class="flex align-center flex-direction" style="width: 33.33%" @click="uppic('3')">
						<view class="solids block140 discenter" v-if="isfrb==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrb" class="block140" mode="" v-else></image>
						<text class="mt10">第四张</text>
					</view>
					<view class="flex align-center flex-direction" style="width: 33.33%" @click="uppic('4')">
						<view class="solids block140 discenter" v-if="isfrc==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrc" class="block140" mode="" v-else></image>
						<text class="mt10">第五张</text>
					</view>
					<view class="flex align-center flex-direction" style="width: 33.33%" @click="uppic('5')">
						<view class="solids block140 discenter" v-if="isfrd==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrd" class="block140" mode="" v-else></image>
						<text class="mt10">第六张</text>
					</view>
				</view>
			</view>
			
			
			<view class=" py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">具体需求</view>
				</view>
				<view class="flex align-center justify-end" >
					<textarea v-model="description" maxlength="300" @input="writeings" placeholder="请输入你的具体需求内容~"
						placeholder-class="text-info f12" class="pt10 text-black wp100 writebox-textarea"
						style="border: 1px solid #ccc;"></textarea>
				</view>
				<view class="bg-white flex align-center justify-end px15 pb10">
					<text class="text-red">{{worldss}}</text>
					<text class="text-info">/</text>
					<text class="text-info">300</text>
				</view>
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15" >
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">性别</view>
				</view>
				<view class="flex align-center justify-end" >
					<input class="text--right f14 mr5" disabled v-model="sextype" @click="choicebox=true;selectIndex=2;" placeholder-class="text-info" placeholder="选择性别"   />
					<text class="cuIcon-right text-info"></text>
				</view>
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15" >
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">送达时间</view>
				</view>
				<view class="flex align-center justify-end" >
					<input class="text--right f14 mr5" disabled v-model="timetype" @click="choicebox=true;selectIndex=3;" placeholder-class="text-info" placeholder="请选择送达时间"   />
					<text class="cuIcon-right text-info"></text>
				</view>
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">详细地址</view>
				</view>
				<input class="text--right f14" v-model="address" placeholder-class="text-info" placeholder="请输入您店铺的详细地址"   />
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">赏金</view>
				</view>
				<input class="text--right f14 color-black " v-model="payMoney"   placeholder-class="text-info" placeholder="请输入赏金金额(元)"   />
			</view>
			
			
			<!-- <view class="flex align-center justify-between  py15 bb1  px15" >
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">店铺类型</view>
				</view>
				<view class="flex align-center justify-end" >
					<input class="text--right f14 mr5" disabled v-model="shoptype" @click="choicebox=true" placeholder-class="text-info" placeholder="请选择店铺类型"   />
					<text class="cuIcon-right text-info"></text>
				</view>
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">法人姓名</view>
				</view>
				<input class="text--right f14 color-black " v-model="shopManager"   placeholder-class="text-info" placeholder="请输入法人姓名"   />
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">身份证</view>
				</view>
				<input class="text--right f14 color-black " v-model="idCard"  placeholder-class="text-info" placeholder="请输入身份证号"   />
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">联系电话</view>
				</view>
				<input class="text--right f14 " v-model="shopTel" placeholder-class="text-info" placeholder="请输入联系电话"   />
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15"   @tap="toggleTab('region')">
				<view class=" flex align-center mw100">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">店铺位置</view>
				</view>
				<view class="flex align-center justify-end"  >
					<input class="text--right f14 mr5" disabled  placeholder-class="text-info" placeholder="请选择" v-if="shopaddess==''"   />
					<text class="f14 mr5" v-else>{{shopaddess}}</text>
					<text class="cuIcon-right text-info"></text>
				</view>
			</view>  
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">详细地址</view>
				</view>
				<input class="text--right f14" v-model="shoplive" placeholder-class="text-info" placeholder="请输入您店铺的详细地址"   />
			</view>
			<view class="flex align-center justify-between  py5 mt10  px15">
				<view class="flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">法人证件照</view>
				</view>
			</view>
			<view class="flex align-center mt15 px20">
				<view class="flex align-center  justify-between wp100 px5">
					<view class="flex align-center flex-direction" @click="uppic('0')">
						<view class="solids block140 discenter" v-if="isfrz==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrz" class="block140" mode="" v-else></image>
						<text class="mt10">正面</text>
					</view>
					<view class="flex align-center flex-direction" @click="uppic('1')">
						<view class="solids block140 discenter" v-if="isfrf==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isfrf" class="block140" mode="" v-else></image>
						<text class="mt10">反面</text>
					</view>
				</view>
			</view>
			<view class="flex align-center justify-between  py15   px15">
				<view class=" flex align-center ">
					<view class="text-danger  f14 ">*</view>
					<view class="f14  ml5">上传营业执照</view>
				</view>
			</view>
			<view class="flex align-center mt15 px20">
				<view class="flex align-center  justify-between wp100 px5">
					<view class="flex align-center flex-direction" @click="uppic('2')">
						<view class="solids block140 discenter" v-if="isyyz==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isyyz" class="block140" mode="" v-else></image>
						<text class="mt10">正本</text>
					</view>
					<view class="flex align-center flex-direction" @click="uppic('3')">
						<view class="solids block140 discenter" v-if="isyyf==''"><text class="cuIcon-add f30 text-info"></text></view>
						<image :src="isyyf" class="block140" mode="" v-else></image>
						<text class="mt10">副本</text>
					</view>
				</view>
			</view>
			<view class="flex align-center justify-between  py15 bb1  px15">
				<view class=" flex align-center ">
					<view class="text-danger  f16 ">*</view>
					<view class="f16  ml5">营业执照号码</view>
				</view>
				<input class="text--right f14 " v-model="yyNum" placeholder-class="text-info" placeholder="请输入营业执照号码"/>
			</view> -->
			<view class="px20 mt20">
				<button @click="tijiao" class="button-jianbian f16 text-white boxsq  discenter ">确认发布</button>
			</view>
		</view>
		<view class="mengceng" @click="choicebox=false" v-if="choicebox"></view>
		<view class="choice-box flex flex-direction bg-white" v-if="choicebox && selectIndex==0" >
			<view class="flex al-strar justify-between py10 px30">
				<view class="text-info f18" @click="choicebox=false">取消</view>
				<view class="text-prices f18" @click="suretypes0">确定</view>
			</view>
			<view class="" style="display: flex;justify-content: space-between;flex-wrap: wrap;">
				<view v-for="(item,index) in typelist" 
				      class="discenter py20 f18" 
					  @click="typenumber=index" 
					  :class="{'text-danger':typenumber==index}" 
					  :key="index" style="width: 33%;">{{item.name}}</view>
			</view>
		</view>
		<view class="choice-box flex flex-direction bg-white" v-if="choicebox && selectIndex==1">
			<view class="flex al-strar justify-between py10 px30">
				<view class="text-info f18" @click="choicebox=false">取消</view>
				<view class="text-prices f18" @click="suretypes1">确定</view>
			</view>
			<view class="">
				<view v-for="(item,index) in typelist1" class="discenter py20 f18" @click="typenumber=index" :class="{'text-danger':typenumber==index}" :key="index">{{item.name}}</view>
			</view>
			
		</view>
		<view class="choice-box flex flex-direction bg-white" v-if="choicebox && selectIndex==2">
			<view class="flex al-strar justify-between py10 px30">
				<view class="text-info f18" @click="choicebox=false">取消</view>
				<view class="text-prices f18" @click="suretypes2">确定</view>
			</view>
			<view class="">
				<view v-for="(item,index) in typelist2" class="discenter py20 f18" @click="typenumber=index" :class="{'text-danger':typenumber==index}" :key="index">{{item.name}}</view>
			</view>
			
		</view>
		<view class="choice-box flex flex-direction bg-white" v-if="choicebox && selectIndex==3">
			<view class="flex al-strar justify-between py10 px30">
				<view class="text-info f18" @click="choicebox=false">取消</view>
				<view class="text-prices f18" @click="suretypes3">确定</view>
			</view>
			<view class="" style="display: flex;justify-content: space-between;flex-wrap: wrap;">
				<view v-for="(item,index) in typelist3" style="width: 33%;" class="discenter py20 f18" @click="typenumber=index" :class="{'text-danger':typenumber==index}" :key="index">{{item.name}}</view>
			</view>
			
		</view>
		<w-picker
			mode="region"
			:defaultVal="regionDval"
			:areaCode="arealist"
			:hideArea="false"
			@confirm="onConfirm" 
			ref="region"
			:timeout="true"
		></w-picker>
	</view>
</template>
<script>
import uploadFile from '@/mixins/uploadFile'
import wPicker from "@/components/w-picker/w-picker.vue";
import { mapState, mapActions } from 'vuex'
export default {
	mixins: [uploadFile],
	components:{
	    wPicker
	 },
	data() {
		return {
			desc:'',
			worldss:0,
			category:'',
			community:'',
			description:'',
			sex:'',
			deliveryTime:'',
			address:'',
			payMoney:'',
			
			typelist1:[{name: "气化街社区"}, {name: "众纺路社区"}, {name: "纺织苑东社区"}, {name: "纺织苑西社区"}, {name: "南内环西街社区"}, {name: "大众街社区"}, {name: "大王社区"}],
			typelist2:[{name: "不限"}, {name: "男"}, {name: "女"}],
			typelist3:[{name: "半小时之内"},{name: "1小时之内"}, {name: "1~2小时"}, {name: "2~3小时"}, {name: "3~4小时"}, {name: "4~5小时"}, {name: "5~6小时"}, {name: "6~7小时"},{name: "7~8小时"}],
			selectIndex: 0,
			//类型
			shoptype:'',
			shoptypeid:'',
			communitytype: '',
			communityid: '',
			sextype:'',
			sextypeid:'',
			timetype:'',
			timetypeid:'',
			
			//头像
			uploadpic:'',
			imghead:'',
			//名称
			shopName:'',
			//类型
			shoptype:'',
			shoptypeid:'',
			//姓名身份证电话
			shopManager:'',
			idCard:'',
			shopTel:'',
			//位置
			shopaddess:'',
			//省市区
			city:'',
			province:'',
			district:'',
			//详细
			shoplive:'',
			//营业执照号
			yyNum:'',
			
			//法人
			frz:'',
			frf:'',
			fra:'',
			frb:'',
			frc:'',
			frd:'',
			isfrz:'',
			isfrf:'',
			isfra:'',
			isfrb:'',
			isfrc:'',
			isfrd:'',
			//营业执照
			yyz:'',
			yyf:'',
			isyyz:'',
			isyyf:'',
			//
			choicebox:false,
			typelist:[],
			typenumber:-1,
			linkageVal:'',
			arealist:[],
			regionDval:[],
			
			payMoney: ''
		}
	},
	computed: {
		...mapState(['token', 'userInfo', 'update', 'baseURL','storeinformation','shopfenlei']),
	},
	onLoad(e) {
		this.getData()
	},
	onBackPress() {
		this.choicebox=false
	},
	methods: {
		...mapActions(['setStoreaddress','setUpdate','getUser']),
		async getData() {
			let {data:{storeType}} = await this.$http.post('store.sqstorepage',{storeLoading:true})
			this.typelist=storeType
		},
		async uppic(e){
			let [err, res] = await uni.chooseImage({
				count: 1,
				sizeType: ['compressed'],
				sourceType: ['album']
			})
			if (res) {
				if(e==0){
					this.isfrz= res.tempFilePaths.shift()
				}
				if(e==1){
					this.isfrf= res.tempFilePaths.shift()
				}
				if(e==2){
					this.isfra = res.tempFilePaths.shift()
				}
				if(e==3){
					this.isfrb = res.tempFilePaths.shift()
				}
				if(e==4){
					this.isfrc = res.tempFilePaths.shift()
				}
				if(e==5){
					this.isfrd = res.tempFilePaths.shift()
				}
			}
		},
		async uploadPassport() {
			let [err, res] = await uni.chooseImage({
				count: 1,
				sizeType: ['compressed'],
				sourceType: ['album']
			})
			if (res) {
				this.uploadpic = res.tempFilePaths.shift()
			}
		},
		toggleTab(str){
			this.$refs[str].show();
		},
		onConfirm(val){
			this.province=val.checkArr[0]
			this.city=val.checkArr[1]
			this.district=val.checkArr[2]
			this.shopaddess=val.result
		},
		async tijiao() {
			if (this.shoptype == '') {
				uni.showToast({
					title: '请选择服务类型',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			if (this.communitytype == '') {
				uni.showToast({
					title: '请选择社区',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			if (this.description == '') {
				uni.showToast({
					title: '请填写描述信息',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			if (this.sextype == '') {
				uni.showToast({
					title: '请选择性别',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			if (this.timetype == '') {
				uni.showToast({
					title: '请选择送达时间',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			if (this.address == '') {
				uni.showToast({
					title: '请选择地址',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			if (this.payMoney == '') {
				uni.showToast({
					title: '请选择支付金额',
					delta: 1500,
					icon: 'none'
				})
				return false
			}
			
			this.pushPage('/pages/fabu/fabupay?money='+this.payMoney);
			
			
			// if(this.uploadpic==''){
			// 	uni.showToast({
			// 		title: '请上传店铺头像',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }else{
			// 	let {
			// 		data: { updateToken, updateUrl, prefixUrl }
			// 	} = await this.$http.post('user.getQnToken', {}, { tipConfig: { storeLoading: true } })
			// 	let img = await this.qnUploadFile({ url: updateUrl, prefixUrl, files: this.uploadpic, formData: { token: updateToken } })
			// 	this.imghead = img[0]
			// }
			// if (this.shopName == '') {
			// 	uni.showToast({
			// 		title: '请输入店铺名称',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }
			// if (this.shoptypeid == '') {
			// 	uni.showToast({
			// 		title: '请选择店铺类型',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }
			// if (this.shopManager == '') {
			// 	uni.showToast({
			// 		title: '请输入法人姓名',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// } 
			// if (this.idCard == '') {
			//  	uni.showToast({
			//  		title: '请输入身份证号',
			//  		delta: 1500,
			//  		icon: 'none'
			//  	})
			//  	return false
			// } 
			// if (this.shopTel == '') {
			// 	uni.showToast({
			// 		title: '请输入联系电话',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }
			// if (this.shopaddess == '') {
			// 	uni.showToast({
			// 		title: '请选择店铺位置',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }
			// if (this.shoplive == '') {
			// 	uni.showToast({
			// 		title: '请填写店铺的详细地址',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }
			// if (this.isfrz=='') {
			// 	uni.showToast({
			// 		title: '请上传照片',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }else{
			// 	if (this.isfrz) {
			// 		let {
			// 			data: { updateToken, updateUrl, prefixUrl }
			// 		} = await this.$http.post('user.getQnToken', {}, { tipConfig: { storeLoading: true } })
			// 		let img = await this.qnUploadFile({ url: updateUrl, prefixUrl, files: this.isfrz, formData: { token: updateToken } })
			// 		this.frz = img[0]
			// 	}
			// }
			// if (this.isfrf=='') {
			// 	uni.showToast({
			// 		title: '请上传照片',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }else{
			// 	if (this.isfrf) {
			// 		let {
			// 			data: { updateToken, updateUrl, prefixUrl }
			// 		} = await this.$http.post('user.getQnToken', {}, { tipConfig: { storeLoading: true } })
			// 		let img = await this.qnUploadFile({ url: updateUrl, prefixUrl, files: this.isfrf, formData: { token: updateToken } })
			// 		this.frf = img[0]
			// 	}
			// }
			// if (this.isfra=='') {
			// 	uni.showToast({
			// 		title: '请上传照片',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }else{
			// 	if (this.isfra) {
			// 		let {
			// 			data: { updateToken, updateUrl, prefixUrl }
			// 		} = await this.$http.post('user.getQnToken', {}, { tipConfig: { storeLoading: true } })
			// 		let img = await this.qnUploadFile({ url: updateUrl, prefixUrl, files: this.isfra, formData: { token: updateToken } })
			// 		this.fra = img[0]
			// 	}
			// }
			// if (this.isyyz=='') {
			// 	uni.showToast({
			// 		title: '请上传营业执照正本',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }else{
			// 	if (this.isyyz) {
			// 		let {
			// 			data: { updateToken, updateUrl, prefixUrl }
			// 		} = await this.$http.post('user.getQnToken', {}, { tipConfig: { storeLoading: true } })
			// 		let img = await this.qnUploadFile({ url: updateUrl, prefixUrl, files: this.isyyz, formData: { token: updateToken } })
			// 		this.yyz = img[0]
			// 	}
			// }
			// if (this.isyyf=='') {
			// 	uni.showToast({
			// 		title: '请上传营业执照副本',
			// 		delta: 1500,
			// 		icon: 'none'
			// 	})
			// 	return false
			// }else{
			// 	if (this.isyyf) {
			// 		let {
			// 			data: { updateToken, updateUrl, prefixUrl }
			// 		} = await this.$http.post('user.getQnToken', {}, { tipConfig: { storeLoading: true } })
			// 		let img = await this.qnUploadFile({ url: updateUrl, prefixUrl, files: this.isyyf, formData: { token: updateToken } })
			// 		this.yyf = img[0]
			// 	}
			// }
			let params = {
				storeImg:this.imghead,
				storeName: this.shopName,
				typeId:this.shoptypeid,
				farenName: this.shopManager,
				storeIdCard: this.idCard,
				farenTel: this.shopTel,
				storeSheng:	this.province,
				storeShi:this.city,
				storeXian:this.district,
				storeAddress:this.shopaddess,
				farenZImg:this.frz,
				farenFImg:this.frf,
				yyZImg:this.yyz,
				yyFImg:this.yyf,
				yyNum:this.yyNum
			}
			let {data} = await this.$http.post('store.sqstore', params, { tipConfig: { storeLoading:true,isSuccessTip: true, isSuccessBack: true, navigateBack: 1 },})
			this.getUser()
		},
		suretypes0(){
			this.shoptype=this.typelist[this.typenumber].name
			this.shoptypeid=this.typelist[this.typenumber].id
			this.choicebox=false
			this.typenumber = -1
		},
		suretypes1(){
			this.communitytype=this.typelist1[this.typenumber].name
			this.communitytypeid=this.typelist1[this.typenumber].id
			this.choicebox=false
			this.typenumber = -1
		},
		suretypes2(){
			this.sextype=this.typelist2[this.typenumber].name
			this.sextypeid=this.typelist2[this.typenumber].id
			this.choicebox=false
			this.typenumber = -1
		},
		suretypes3(){
			this.timetype=this.typelist3[this.typenumber].name
			this.timetypeid=this.typelist3[this.typenumber].id
			this.choicebox=false
			this.typenumber = -1
		},
		ChooseImage() {
			uni.chooseImage({
				count: 1, //默认9
				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
				sourceType: ['album'], //从相册选择
				success: res => {
					if (this.imgList.length != 0) {
						this.imgList = this.imgList.concat(res.tempFilePaths)
					} else {
						this.imgList = res.tempFilePaths
					}
				}
			})
		},
		ChooseImages() {
			uni.chooseImage({
				count: 1, //默认9
				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
				sourceType: ['album'], //从相册选择
				success: res => {
					if (this.imgLists.length != 0) {
						this.imgLists = this.imgLists.concat(res.tempFilePaths)
					} else {
						this.imgLists = res.tempFilePaths
					}
				}
			})
		},
		
		ViewImage(e) {
			uni.previewImage({
				urls: this.imgList,
				current: e.currentTarget.dataset.url
			})
		},
		ViewImages(e) {
			uni.previewImage({
				urls: this.imgLists,
				current: e.currentTarget.dataset.url
			})
		},
		
		DelImg(e) {
			uni.showModal({
				content: '删除此图？',

				success: res => {
					if (res.confirm) {
						this.imgList.splice(e.currentTarget.dataset.index, 1)
					}
				}
			})
		},
		DelImgs(e) {
			uni.showModal({
				content: '删除此图？',
		
				success: res => {
					if (res.confirm) {
						this.imgLists.splice(e.currentTarget.dataset.index, 1)
					}
				}
			})
		},
		choicelive(){
			var _this= this;
			uni.chooseLocation({
			    success: function (res) {
					console.log(res)
					_this.shopaddess=res.address
					_this.lnt=res.longitude
					_this.lat=res.latitude
					/*
					console.log('位置名称：' + res.name);
					console.log('详细地址：' + res.address);
					console.log('纬度：' + res.latitude);
					console.log('经度：' + res.longitude);
					*/
			    }
			});
		},
		writeings() {
			this.worldss = this.description.length;
		}
	}
}
</script>

<style lang="less">
.mw100{
	min-width: 200rpx;
}
.block105{
	width: 210rpx;
	height: 210rpx;
}
.bg-f7{
	background-color: #F7F7F7;
	height: 20rpx;
}
.boxsq{
	height: 92rpx;
	border-radius: 50rpx;
}
.text--right{
	text-align: right;
}
.bb1{
	border-bottom: 1rpx solid #F7F7F7 !important;
}
.block140{
	width: 200rpx;
	height: 200rpx;
}
.mengceng{
	width: 100%;
	height: 100%;
	position: fixed;
	top:0;
	left: 0;
	background-color: #050505;
	opacity: 0.5;
	z-index:131;
}
.bg-mengceng{
	background-color: #050505;
	opacity: 0.5;
}
.choice-box{
	width: 100%;
	background-color: #FFFFFF;
	position: fixed;
	bottom: 0;
	z-index: 802;
}
</style>
